// The elements used.
var myForm = document.id('myForm'),
    myResult = document.id('myResult');

// Validation.
new Form.Validator.Inline(myForm);

// Ajax (integrates with the validator).
new Form.Request(myForm, myResult, {
    requestOptions: {
        'spinnerTarget': myForm
    },
   
});